import Vue from 'vue'
import Vuex from 'vuex'
import user from './user'
import roles from './roles'
import order from './order'
import goods from './goods'

Vue.use(Vuex)

const state = {
  //存数据
}

const mutations = {
  //直接修改数据
}

const actions = {
  //与组件当中用户对接
  //一般是异步发请求
  //提交mutations
}


export default new Vuex.Store({
  state,
  actions,
  mutations,
  modules:{
    user,
    roles,
    order,
    goods
  }
})

